@extends('home.lrf_layouts')
@section('body')
<body class="yellow">
<div id="login-page" class="row">
    <div class="col s12 z-depth-6 card-panel">
        <form class="login-form">
            <div class="row">
                <div class="input-field col s12 center">
                    <img src="{{asset('assets/images/avatar.png')}}" alt="头像" width="30%" class="responsive-img valign profile-image-login">
                    <p style="margin-left: 60px;margin-right: 60px;" class="center login-form-text">输入注册时的邮箱找回密码</p>
                </div>
            </div>
            <div class="row margin">
                <div class="input-field col s12">
                    <i class="mdi-social-person-outline prefix"></i>
                    <input class="validate" id="email" type="email">
                    <label for="email" data-error="wrong" data-success="right" class="center-align">邮箱</label>
                </div>
            </div>
            <div class="row">
                <div class="input-field col s12">
                    <a onclick="find_pass()" class="btn waves-effect waves-light col s12">重置我的密码</a>
                </div>
            </div>
            <div class="row">
                <div class="input-field col s6 m6 l6">
                    <p class="margin medium-small"><a href="{{url('register')}}">立刻注册!</a></p>
                </div>
                <div class="input-field col s6 m6 l6">
                    <p class="margin right-align medium-small"><a href="{{url('login')}}">登录</a></p>
                </div>
            </div>

        </form>
    </div>
</div>
<script>
    function find_pass(){
        if($("#email").val()==''){
            layer.msg("请输入email");
            return false;
        }
        $.post('{{url('forget')}}',{'email':$("#email").val(),'_token':'{{csrf_token()}}'},function(res){
            layer.msg(res.msg);
        });
    }
</script>
@endsection